package kr.co.mustgo.domain.qna;

import java.io.Serializable;

public class QnABoard implements Serializable{
	private int code;
	private String title;
	private String name;
	private String contents;
	private String insertDate;
	private int hit;
	private String category;
	private int refamily;
	private int restep;
	private int relevel;
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getContents() {
		return contents;
	}
	public void setContents(String contents) {
		this.contents = contents;
	}
	public String getInsertDate() {
		return insertDate;
	}
	public void setInsertDate(String insertDate) {
		this.insertDate = insertDate;
	}
	public int getHit() {
		return hit;
	}
	public void setHit(int hit) {
		this.hit = hit;
	}
	public String getCategory() {
		return category;
	}
	public void setCategory(String category) {
		this.category = category;
	}
	public int getrefamily() {
		return refamily;
	}
	public void setrefamily(int refamily) {
		this.refamily = refamily;
	}
	public int getRestep() {
		return restep;
	}
	public void setRestep(int restep) {
		this.restep = restep;
	}
	public int getRelevel() {
		return relevel;
	}
	public void setRelevel(int relevel) {
		this.relevel = relevel;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((category == null) ? 0 : category.hashCode());
		result = prime * result + code;
		result = prime * result
				+ ((contents == null) ? 0 : contents.hashCode());
		result = prime * result + hit;
		result = prime * result
				+ ((insertDate == null) ? 0 : insertDate.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + refamily;
		result = prime * result + relevel;
		result = prime * result + restep;
		result = prime * result + ((title == null) ? 0 : title.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		QnABoard other = (QnABoard) obj;
		if (category == null) {
			if (other.category != null)
				return false;
		} else if (!category.equals(other.category))
			return false;
		if (code != other.code)
			return false;
		if (contents == null) {
			if (other.contents != null)
				return false;
		} else if (!contents.equals(other.contents))
			return false;
		if (hit != other.hit)
			return false;
		if (insertDate == null) {
			if (other.insertDate != null)
				return false;
		} else if (!insertDate.equals(other.insertDate))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (refamily != other.refamily)
			return false;
		if (relevel != other.relevel)
			return false;
		if (restep != other.restep)
			return false;
		if (title == null) {
			if (other.title != null)
				return false;
		} else if (!title.equals(other.title))
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "QnABoard [code=" + code + ", title=" + title + ", name=" + name
				+ ", contents=" + contents + ", insertDate=" + insertDate
				+ ", hit=" + hit + ", category=" + category + ", refamily="
				+ refamily + ", restep=" + restep + ", relevel=" + relevel
				+ "]";
	}
	public QnABoard(int code, String title, String name, String contents,
			String insertDate, int hit, String category, int refamily,
			int restep, int relevel) {
		super();
		this.code = code;
		this.title = title;
		this.name = name;
		this.contents = contents;
		this.insertDate = insertDate;
		this.hit = hit;
		this.category = category;
		this.refamily = refamily;
		this.restep = restep;
		this.relevel = relevel;
	}
	public QnABoard(String title, String name, String contents, String category) {
		super();
		this.title = title;
		this.name = name;
		this.contents = contents;
		this.category = category;
	}
	public QnABoard(int code, String title, String name, String contents,
			String insertDate, int hit, String category) {
		super();
		this.code = code;
		this.title = title;
		this.name = name;
		this.contents = contents;
		this.insertDate = insertDate;
		this.hit = hit;
		this.category = category;
	}
	public QnABoard() {
		super();
	}


}
